package com.xinggq.pay.api.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.math.BigDecimal;
import lombok.Data;

/**
 * 银盛退款请求参数
 * @Description
 * @Author xinggq
 * @Date 2025/9/18
 */
@Data
@Schema(description = "银盛退款请求参数")
public class YseCommonRefundReqDTO {

  @Schema(description = "商户侧退款单号", example = "REFUND202501200001", requiredMode = Schema.RequiredMode.REQUIRED)
  @NotBlank(message = "商户侧退款单单号不能为空")
  private String merchantOutTradeNo;

  @Schema(description = "原支付订单的商户订单号", example = "PAY202501200001", requiredMode = Schema.RequiredMode.REQUIRED)
  @NotBlank(message = "原商户单号不能为空")
  private String payMerchantOutTradeNo;

  @Schema(description = "退款原因", example = "商品质量问题", requiredMode = Schema.RequiredMode.REQUIRED)
  @NotBlank(message = "退款原因不能为空")
  private String refundReason;

  @Schema(
      description = "退款金额，单位：元",
      example = "99.99",
      minimum = "0.01",
      requiredMode = Schema.RequiredMode.REQUIRED
  )
  @NotNull(message = "退款金额不能为空")
  @DecimalMin(value = "0.01", message = "退款金额必须大于0")
  private BigDecimal refundAmount;
}
